//
//  LocalVideo.m
//  HuateVideo
//
//  Created by Tiger on 12-7-19.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "LocalVideo.h"

@implementation LocalVideo

@synthesize username;
@synthesize time;
@synthesize URL;
@synthesize size;
@synthesize image;
@synthesize storePath;

@synthesize total;
@synthesize ok;
@synthesize title;
@synthesize describe;
@synthesize seconds;
@synthesize type;
@synthesize name;
@synthesize fileid;
@synthesize webid;
@synthesize fileType;

- (id)initWithCoder:(NSCoder *)decoder {
    self = [super init];
    if(self) {
        self.username = [decoder decodeObjectForKey:@"username"];
        self.time = [decoder decodeObjectForKey:@"time"];
        self.URL = [decoder decodeObjectForKey:@"URL"];
        self.size = [decoder decodeFloatForKey:@"size"];
        self.image = [decoder decodeObjectForKey:@"image"];
        self.storePath = [decoder decodeObjectForKey:@"storePath"];
        
        self.total = [decoder decodeIntForKey:@"total"];
        self.ok = [decoder decodeIntForKey:@"ok"];
        self.title = [decoder decodeObjectForKey:@"title"];
        self.describe = [decoder decodeObjectForKey:@"describe"];
        self.seconds = [decoder decodeIntForKey:@"seconds"];
        self.type = [decoder decodeObjectForKey:@"type"];
        self.name = [decoder decodeObjectForKey:@"name"];
        self.fileid = [decoder decodeObjectForKey:@"fileid"];
        self.webid = [decoder decodeIntForKey:@"webid"];
        self.fileType = [decoder decodeObjectForKey:@"fileType"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeObject:self.username forKey:@"username"];
    [encoder encodeObject:self.time forKey:@"time"];
    [encoder encodeObject:self.URL forKey:@"URL"];
    [encoder encodeFloat:self.size forKey:@"size"];
    [encoder encodeObject:self.image forKey:@"image"];
    [encoder encodeObject:self.storePath forKey:@"storePath"];
    
    [encoder encodeInt:self.total forKey:@"total"];
    [encoder encodeInt:self.ok forKey:@"ok"];
    [encoder encodeObject:self.title forKey:@"title"];
    [encoder encodeObject:self.describe forKey:@"describe"];
    [encoder encodeInt:self.seconds forKey:@"seconds"];
    [encoder encodeObject:self.type forKey:@"type"];
    [encoder encodeObject:self.name forKey:@"name"];
    [encoder encodeObject:self.fileid forKey:@"fileid"];
    [encoder encodeInt:self.webid forKey:@"webid"];
    [encoder encodeObject:self.fileType forKey:@"fileType"];
}

-(void)dealloc{
    self.username = nil;
    self.time = nil;
    self.URL = nil;
    self.image = nil;
    self.storePath = nil;
    
    self.title = nil;
    self.describe = nil;
    self.type = nil;
    self.name = nil;
    self.fileid = nil;
    self.fileType = nil;
    [super dealloc];
}

@end
